if __name__ == '__main__':
    year = int(input("Please input Year:"))
    month = int(input("Please input Month:"))
    days = 0

    if month in [1, 3, 5, 7, 8, 10, 12]:
        days = 31
    elif month in [4, 6, 9, 11]:
        days = 30
    else:
        if month % 400 == 0 or (month % 4 == 0 and month % 100 != 0):
            days = 29
        else:
            days = 28

    print("%dYear%dMonth has%ddays" % (year, month, days))
